import request from '@/utils/request'

// 查询门卡配置列表
export function listCards(query) {
  return request({
    url: '/personnel/cards/list',
    method: 'get',
    params: query
  })
}

// 查询门卡配置详细
export function getCards(cardId) {
  return request({
    url: '/personnel/cards/' + cardId,
    method: 'get'
  })
}

// 新增门卡配置
export function addCards(data) {
  return request({
    url: '/personnel/cards',
    method: 'post',
    data: data
  })
}

// 修改门卡配置
export function updateCards(data) {
  return request({
    url: '/personnel/cards',
    method: 'put',
    data: data
  })
}

// 删除门卡配置
export function delCards(cardId) {
  return request({
    url: '/personnel/cards/' + cardId,
    method: 'delete'
  })
}
